Skip to content

(Towards #1823) Permit only module-inlined Kernels to be transformed#3294

Open
arporter wants to merge 21 commits intomasterfrom
1823_transform_inlined_kerns_only
Open

(Towards #1823) Permit only module-inlined Kernels to be transformed#3294
arporter wants to merge 21 commits intomasterfrom
1823_transform_inlined_kerns_only

Conversation

@arporter
Copy link
Member

No description provided.

@arporter arporter self-assigned this Jan 21, 2026
@arporter arporter marked this pull request as draft January 21, 2026 17:11
@arporter
Copy link
Member Author

Possibly I need to store the RoutineSymbol associated with a Kernel within the Kernel class (c.f. Call.reference). That way, I can tell whether it has been module-inlined or not and can get rid of the special flag for that.

@arporter
Copy link
Member Author

arporter commented Jan 23, 2026

Note to self: I will need to remove the kernel_outputdir test fixture.

EDIT: can't do this because we do still output OpenCL versions of kernels in some tests.

@codecov
Copy link

codecov bot commented Jan 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.95%. Comparing base (854913c) to head (2eaf62c).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3294      +/-   ##
==========================================
- Coverage   99.95%   99.95%   -0.01%     
==========================================
  Files         380      381       +1     
  Lines       53912    53795     -117     
==========================================
- Hits        53890    53773     -117     
  Misses         22       22              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@arporter
Copy link
Member Author

arporter commented Feb 4, 2026

Coverage is now all good but the LFRic extraction integration test failed :-(

@arporter
Copy link
Member Author

arporter commented Feb 4, 2026

In lfric/eg17/full_example_extract:

$ diff main_psy.f90 on_main/main_psy.f90 
4d3
<   use testkern_w0_kernel_mod, only : testkern_w0_code
74a74
>     use testkern_w0_kernel_mod, only : some_other_var, testkern_w0_code

so it appears the some_other_var import is missing on my branch.

@arporter
Copy link
Member Author

arporter commented Feb 4, 2026

This turned out to be due to the fact that I've moved the import of Kernel routines up into the Container and then the ExtractNode was falling foul of #1734

@arporter arporter deployed to integration February 4, 2026 20:59 — with GitHub Actions Active
@arporter arporter marked this pull request as ready for review February 4, 2026 21:07
@arporter
Copy link
Member Author

arporter commented Feb 4, 2026

Assuming the ITs come back green this time, this is ready for review. Primarily, it adds checks such that any kernel transformations will fail unless the kernel has already been module inlined. Unfortunately, updating some of those transformations got a bit hairy (e.g. to deal with multiple calls to the same kernel). The situation will improve again once we re-name module-inlined routines (which this PR is a pre-cursor to). As part of this, I moved the location of the USE statements for kernel modules up to the container level. This affected the text checked for in quite a few tests.
Now that we require a kernel to be module-inlined before it is transformed, I have removed all of the 'rename-and-write' machinery that we used to have. Now that I write that, this probably means the user guide needs to be updated and I'm pretty sure I haven't done that. That can be for next time around ;-)
One for @hiker, @sergisiso or @LonelyCat124.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant